home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 15014 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: news1.sunbelt.net!usenet
  2. From: bourne@infoave.net (Rick Huebner)
  3. Newsgroups: comp.lang.c,comp.lang.c++
  4. Subject: returning an array from function
  5. Date: 3 Apr 1996 04:04:56 GMT
  6. Organization: SunBelt.Net INTERNET Access
  7. Distribution: world
  8. Message-ID: <4jstd8$kh0@news1.sunbelt.net>
  9. Reply-To: bourne@infoave.net
  10. NNTP-Posting-Host: dial-1.r2.gastbo.infoave.net
  11. X-Newsreader: NeoLogic News for OS/2 [version: 4.5 YO Beta]
  12.  
  13. I have looked in several texts and looked through the faq for this question
  14. and can't find a reference for my answer.  I am trying to return an array, or
  15. a pointer to the array, from a function.  I have seen several examples of
  16. returning a pointer, but it doesn't seem to work for me.  My function is going
  17. to return an array of integers where 1-80 of them will be significant.  The
  18. calling function will know how many integers are expected and will read them
  19. off the array....If I can get the pointer back to the array.  A friend of mine
  20. told me to just make the array a global, but I don't want to do that if I can
  21. help it.  I would even resort to a recursive function that will pass the
  22. integers back one at a time if that is possible.  Does anyone have any
  23. suggestions?  I am open to anything and will go looking if you can tell me
  24. where(hopefully online somewhere).
  25.  
  26. Thanks...
  27.  
  28. --
  29. Rick Huebner EMT-P FF BS
  30. Team OS/2    bourne@InfoAve.net
  31. Warping along the Internet
  32.  
  33.